package SunDayCoding.controller;

public class ExgCode2 {
    public static void main(String[] args) {
        int sum = 0, i = 1;
        int j = 2;
//        for (int j = 1; j <= 100; j++) {
//            sum=sum+j;//5050
//        }
        while (j <= 100) {
            sum = sum + j;//5050
            j += 2;
        }
        System.out.println("sum = " + sum);
    }
}
